package filesearch;

import java.io.File;
import java.util.List;

public class Demo {
    public static void main(String[] args) {
        searchfiles searchfiles = new searchfiles();
        File directory = new File("day21-file/def");
        String fileName = "2.txt";

        searchfiles.searchFiles(directory,fileName);

        List<String> results = searchfiles.getFoundFiles();
        if (results.isEmpty()) {
            System.out.println("没有找到名为:" + fileName + "的文件");
        }
    }
}
